using System;
using System.Drawing.Drawing2D;
using System.Data;
using System.Data.Odbc;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Reviewer.Entities.Services;
using Reviewer.Business;
using System.Collections.Generic;
using Reviewer.Entities;

public partial class V2Controls_Top5Screenshots : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            using (IGameScreenshotService service = ServiceFactory.GameScreenshotService)
            {
                ICollection<GameScreenshotSearchResult> items = service.Search(10);
                if (items != null && items.Count > 0)
                {
                    this.uiRepScreenshots.DataSource = items;
                    this.uiRepScreenshots.DataBind();
                }
                else
                {
                    this.Visible = false;
                }
            }
        }
    }
}
